import http from "@/utils/http/hub";
/**
 * 活动列表全部
 */
export const manageMerchantListAll = (
  params,
  config = {
    custom: {
      auth: false,
      loading: false,
    },
  }
) => {
  return http.get({
    url: `/miniProgramManage/merchant/manageMerchantListAll`,
    params,
    config,
  });
};

//活动列表
export const manageMerchantList = (params, config = {}) =>
  http.get({
    url: "/miniProgramManage/merchant/manageMerchantList",
    params,
    config,
  });

/**
 * 活动(任务)详情
 */
export const activityInfo = (params, config = {}) =>
  http.get({
    url: "/miniProgramManage/merchant/activityInfo",
    params,
    config,
  });

/**
 * 编辑活动(任务)
 */
export const manageEnrollEdit = (params, config = {}) =>
  http.post({
    url: "/miniProgramManage/merchant/manageEnrollEdit",
    params,
    config,
  });

/**
 * 添加活动(任务)
 */
export const manageEnrollAdd = (params, config = {}) =>
  http.post({
    url: "/miniProgramManage/merchant/manageEnrollAdd",
    params,
    config,
  });

/**
 * 添加(任务)/实时订单
 */
export const realTimeOrder = (params, config = {}) =>
  http.get({
    url: "/miniProgramManage/merchant/realTimeOrder",
    params,
    config,
  });

/**
 * 顾客报名
 */
export const addEnroll = (params, config = {}) =>
  http.post({
    url: "/miniProgramManage/merchant/addEnroll",
    params,
    config,
  });

/**
 * 顾客取消报名
 */
export const cancelExamine = (params, config = {}) =>
  http.get({
    url: "/miniProgramManage/merchant/cancelExamine",
    params,
    config,
  });

/**
 * 顾客注册(商务合作)
 */
export const manageMerchantAdd = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) =>
  http.post({
    url: "/miniProgramManage/merchant/manageMerchantAdd",
    params,
    config,
  });

/**
 * 获取店铺列表
 */
export const shouList = (
  params,
  config = {
    custom: {
      auth: true,
      loading: false,
    },
  }
) =>
  http.get({
    url: "/miniProgramManage/merchant/shouList",
    params,
    config,
  });

/**
 * 账户余额
 */
export const balanceInfo = (
  params,
  config = {
    custom: {
      auth: true,
      loading: false,
    },
  }
) =>
  http.get({
    url: "/miniProgramManage/merchant/balanceInfo",
    params,
    config,
  });

/**
 * 提现记录
 */
export const recordsList = (
  params,
  config = {
    custom: {
      auth: true,
      loading: false,
    },
  }
) =>
  http.get({
    url: "/miniProgramManage/merchant/recordsList",
    params,
    config,
  });

/**
 * 提现
 */
export const payTX = (
  params,
  config = {
    custom: {
      auth: true,
      loading: false,
    },
  }
) =>
  http.post({
    url: "/miniProgramManage/merchant/payTX",
    params,
    config,
  });
